<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<script src="js/jquery-1.4.3.js"></script>
<script>
	
	function gender(){
		
		$.ajax({
			
			"url":"gender.do",
			"dataType":"text",
			"type":"post",
			"success":function(data){
				
				$('#ran').val(data);
				
				
				
			}
			
			
			
		});
		
		
		
	}	
	
	

</script>



<body>

	<form action="" method="post">
		
		<input type="text" id="ran"/>
		<input type="button" value="点击生成随机数" 
			onclick="gender();"/>
				
	</form>



</body>
</html>